<script type="text/javascript">
jQuery(document).ready(function(jQuery) {

    jQuery('#wishlistmanager_form').submit(function() {    

        val = jQuery('#wishlistmanager').val();  		
        switch(val)
        {
            case "create": 
				jQuery.openOverlay('<?=site_url('wishlist/overlay_create_new_wishlist') ?>');
            break;
            case "delete": 
			
				jQuery.openOverlay('<?=site_url('wishlist/overlay_delete_wishlist')?>/'+jQuery('#wishlistmanager_form #wishlist_id').val());
			
            break;
            default: 
            caption ="default";
        }
        return false;
    });
	
});
</script>


<div id="quicksearch">
  <form id="wishlistmanager_form" action="" method="post">
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
      <tbody><tr>
        <td><select style="width: 150px;" class="inputbox" name="wishlistmanager" id="wishlistmanager">
          <option selected="selected" value="">Wish List Manager</option>
          <option value="create">Create New List</option>

          <?
          if ($current_wishlist_id != FALSE) {
          ?>
              <option value="delete">Delete Current List</option>
              <input type="hidden" id="wishlist_id" name="wishlist_id" value="<?=$current_wishlist_id?>" />     
              <input type="hidden" name="wishlist_action" value="delete_wishlist" />     

          <?
          }
          ?>

        </select></td>
        <td>
		<input type="hidden" name="token" id="token" value="<?=$token?>" />
        <input id="wishlist_manager_submit" type="image" src="<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/gobutton.gif" alt="Go" onmouseover="this.src='<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/gobutton_f2.gif'" onmouseout="this.src='<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/gobutton.gif'" class="submitbox"></td>
      </tr>
    </tbody></table>
  </form>
</div>
